home *** CD-ROM | disk | FTP | other *** search
- ' ========================================================================
- ' Sample VBScript showing all possible functions.
- ' Many of the functions are commented out due to the fact that the
- ' items that are referenced are not included in the default system
- ' configuration database.
- ' ========================================================================
-
- MsgBox "The day of the week is " & GetPropertyValue("System Time.Day Of Week")
-
- For nLoop = 1 To 5
- szTimeAndDate = GetPropertyValue( "System Time.TimeAndDate" )
- TraceMessage( "System Time and Date = " & szTimeAndDate )
- MsgBox "System Time and Date = " & szTimeAndDate
-
- Sleep( 1000 )
- Next
-
- 'ExecuteTask( "Test Task" )
-
- 'If (IsTaskRunning("Test Task") = True) Then
- ' MsgBox "Stopping Task"
- ' StopTask( "Test Task" )
- 'End If
-
- 'MsgBox "Test Mode is " & GetModeState("Test Mode")
-
- 'SetModeState "Test Mode", "Inactive"
-
- 'SetPropertyValue "Test Lamp.Power State", "On"
-
- 'If (GetPropertyValue("Test Lamp.Power State") = "Off") Then
- ' ' Using SetPropertyValue with return code checking.
- ' If (SetPropertyValue( "Test Lamp.Power State", "On" ) = False) Then
- ' TraceErrorMessage( "Setting Test Lamp.Power State to On Failed" )
- ' Else
- ' TraceErrorMessage( "Setting Test Lamp.Power State to On" )
- ' End If
- 'Else
- ' If (SetPropertyValue( "Test Lamp.Power State", "Off" ) = False) Then
- ' TraceErrorMessage( "Setting Test Lamp.Power State to Off Failed" )
- ' Else
- ' TraceErrorMessage( "Setting Test Lamp.Power State to Off" )
- ' End If
- 'End If
-
-
- MsgBox "Test Script Complete!"
-